package com.trafficsys.modules.loginAndRegister.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.trafficsys.modules.entity.DriveCard;
import com.trafficsys.modules.entity.Driver;
import com.trafficsys.modules.licenseplaterecognition.vo.TicketVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Zhao Bin
 * @Date 2021/9/27 10:30
 * @Version 1.0
 */
@Repository
@Mapper
public interface DriveCardDao extends BaseMapper<DriveCard>{
    //根据id查询驾驶员
    @Select("select * from  drive_card where card_id = #{cardId}")
    List<DriveCard> getDriveCardByCardId(@Param("cardId") String cardId);
    //分页查询驾驶员驾驶证
    @Select("select * from  drive_card where card_id = #{cardId}")
    IPage<DriveCard> getDriveCardByCardId(IPage<DriveCard> page, @Param("cardId") String cardId);
}
